#include <dao.h>
#include <btBulletDynamicsCommon.h>

#include "btQuaternion.h"

static void construct(DaoContext *ctx, DValue *p[], int N) {
    btQuaternion* ptr = new btQuaternion(p[0]->v.f, p[1]->v.f, p[2]->v.f, p[3]->v.f);

    DaoCData *cdata = DaoContext_PutCData(ctx, ptr, &btQuaternionTyper);
};

static void destruct(void *self) {
    delete (btQuaternion*) self;
}

static DaoFuncItem meth[] = {
    { construct,	"btQuaternion(x:float, y:float, z:float, w:float)" },
    { NULL, NULL }
};

DaoTypeBase btQuaternionTyper = {
    "btQuaternion",
    NULL,
    NULL,               /* constant */
    meth,       	/* methods */
    { NULL },     	/* parent type */
    { NULL },
    destruct,
    NULL
};
